<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit"/>
    <meta name="force-rendering" content="webkit"/>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="在线编辑与预览">
    <link rel="stylesheet" type="text/css" href="./static/css/common.css">
    <link rel="stylesheet" type="text/css" href="./static/js/layui/css/layui.css">
    <link href="./static/css/font-awesome.min.css" rel="stylesheet">
    <!--[if lt IE 9]>
    <script src="./static/js/html5.min.js"></script>
    <script src="./static/js/respond.min.js"></script>
    <![endif]-->
    <title>在线编辑与预览</title>
    <!-- 引入Monaco Editor -->
     <script>
        
    </script>
    <link rel="stylesheet" href="./static/js/monaco-editor-0.54.0/min/vs/editor/editor.main.css">
    <script src="./static/js/monaco-editor-0.54.0/min/vs/loader.js"></script>
</head>
<body>
    <div class="container">
        <header>
            <div class="header-content">
                <h1>在线编辑与预览工具</h1>
                <div class="controls">
                    <button id="run-btn">运行</button>
                    <button id="reset-btn">重置</button>
                    <button id="save-btn">保存</button>
                </div>
            </div>
        </header>
        
        <div class="main-content">
            <div class="editor-panel">
                <div class="panel-header">
                    <div class="panel-title">代码编辑器</div>
                    <div>
                        <select id="theme-select">
                            <option value="vs">浅色主题</option>
                            <option value="vs-dark">深色主题</option>
                            <option value="hc-black">高对比度</option>
                        </select>
                    </div>
                </div>
                <div class="editor-container">
                    <div id="editor"></div>
                </div>
            </div>
            
            <div class="preview-panel">
                <div class="panel-header">
                    <div class="panel-title">预览区域</div>
                    <div>
                        <button id="fullscreen-btn">全屏预览</button>
                    </div>
                </div>
                <div class="preview-container" id="preview">
                    <!-- 预览内容将在这里显示 -->
                    <h2>欢迎使用在线编辑与预览工具</h2>
                    <p>在左侧编辑器中输入HTML、CSS和JavaScript代码，然后点击"运行"按钮查看预览效果。</p>
                    <div id="demo-content">
                        <h3>示例：创建一个简单的图表</h3>
                        <div id="chart-container" style="width: 100%; height: 300px;"></div>
                    </div>
                </div>
            </div>
        </div>
        
        <footer>
            <p>© 2023 在线编辑与预览工具 | 基于Monaco Editor构建</p>
        </footer>
    </div>

    <script src="./static/js/editor-static.js"></script>
</body>
</html>